package reflect;

import reflect.annotations.AutoRunMethod;

import java.lang.reflect.Method;

public class ReflectDemo10 {
    public static void main(String[] args) throws ClassNotFoundException {
        Class cls = Class.forName("reflect.Person");
        Method[] methods = cls.getDeclaredMethods();
        for (Method method : methods) {
            boolean mark=method.isAnnotationPresent(AutoRunMethod.class);
            System.out.println(method.getName()+"  "+(mark?"被标注":"没被标注"));
        }
    }
}
